package pikes.peak.test;

import org.junit.Assert;

import pikes.html.xhtml.Flow;
import pikes.html.xhtml.NonRootTagFactory;
import pikes.xml.XMLTag;

public final class AssertHtml {

	private AssertHtml() {

	}

	public static void assertEquals(Flow expected, Flow actual) {
		Assert.assertNotNull("Expected object should not be null", expected);
		Assert.assertNotNull("Actual object should not be null", actual);

		XMLTag expectedTag = new XMLTag("sample");
		expected.decorateTag(expectedTag);

		XMLTag actualTag = new XMLTag("sample");
		actual.decorateTag(actualTag);

		Assert.assertEquals(expectedTag, actualTag);
	}

	public static void assertEquals(NonRootTagFactory expected, NonRootTagFactory actual) {
		Assert.assertNotNull("Expected object should not be null", expected);
		Assert.assertNotNull("Actual object should not be null", actual);

		XMLTag expectedTag = new XMLTag("sample");
		expected.decorateTag(expectedTag);

		XMLTag actualTag = new XMLTag("sample");
		actual.decorateTag(actualTag);

		Assert.assertEquals(expectedTag, actualTag);
	}
}
